package com.ctz.commonframe.utils;

import android.content.Context;

public class LogWriter extends AbsBlockedQueueThread<String> {
	private static LogWriter instance = null;
	private Context context;
	
	public synchronized static LogWriter getInstance(Context context){
		if(instance == null)
			instance = new LogWriter(context);
		return instance;
	}
	private LogWriter(Context context){
		super();
		this.context = context;
	}

	@Override
	public void handleData(String data) {
		String path = FilePathUtil.getLogFilePath(context);
		IOUtil.writeString2File(path, data, true);
	}

}
